package com.dyna.domain;

import com.dyna.constants.DateFatter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author zhoucaiwang
 */
@Data
public class TaskSheet {

    @ApiModelProperty(value = "任务id")
    private String taskId;

    @ApiModelProperty(value = "工单编号")
    @NotNull(message = "工单编号不能为空")
    private String sheetNo;

    @ApiModelProperty(value = "工单名")
    @NotBlank(message = "工单名不能为空")
    private String sheetName;

    @ApiModelProperty(value = "处理人")
    private String assignee;

    @ApiModelProperty(value = "工单状态")
    @NotNull(message = "工单状态不能为空")
    private Integer status;

    @ApiModelProperty(value = "请假天数")
    private Integer num;

    @ApiModelProperty(value = "工单描述")
    @NotBlank(message = "工单描述不能为空")
    private String sheetDescription;

    @ApiModelProperty(value = "流程实例id")
    private String processInstanceId;

    @ApiModelProperty(value ="创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime createTime;

    @ApiModelProperty(value ="结束时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime endTime;

}
